-
Notifications
You must be signed in to change notification settings - Fork 26
Add bipartite specialization of belief propagation and gauging #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
| return X, Xinv | ||
| end | ||
| if bipartite | ||
| # copy 1st column to 2nd column to eliminate differences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried not to do the useless update of the 2nd column before copying from the 1st column. But then constinferred of gauge_fix is broken.
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize I never posted this comment. Do you feel like this would make sense, or is it not really too relevant?
| normalize!(M) | ||
| alg.project_hermitian && (M = project_hermitian!!(M)) | ||
| return M | ||
| if alg.bipartite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's not easier to follow if we just write this out manually, calling similar and writing out the coordinates like that.
It probably doesn't matter all that much but I'd like to avoid the double map call, which allocates twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance suggestions are always welcome :) But this way, if we want to differentiate through BP, I guess we must use Mooncake/Enzyme (with mutation support)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point! I guess already the normalize! call might be a problem, but then maybe it's just fine to merge as is
This PR adds a specialized routine of belief propagation for bipartite iPEPS/iPEPO (2 x 2 unit cell with only 2 independent tensors). Accordingly, for simple update and belief propagation gauging, they now will check if the input state (and the
BPEnv) is exactly bipartite, and if so, automatically use a specialized routine to exactly preserve the bipartite-ness.The ultimate solution is
tiledarray, but for now we don't have better choices.